function createData() {
  return new Array(1000)
    .fill(null)
    .map((item, idx) => ({ name: `name${idx + 1}` }));
}
console.time('fill 1000');
const data = createData();
console.timeEnd('fill 1000');
console.log(data);

function createData2() {
  return Array.from({ length: 1000 }, function (item, idx) {
    return { name: `name${idx + 1}` };
  });
}
console.time('array.from');
const data2 = createData2();
console.timeEnd('array.from');
console.log(data2);
